import request from '@/utils/request'

export const questionList = (search) =>
  request({
    url: '/question',
    method: 'get',
    params: {
      topicName: search.topicName,
      offset: search.offset,
      limit: search.limit
    }
  })
export const saveQuestion = (question) =>
  request({
    url: '/question/add',
    method: 'post',
    data: question
  })
export const updateQuestion = (id, question) =>
  request({
    url: '/question/' + id,
    method: 'put',
    data: question
  })
export const removeQuestion = (id) =>
  request({
    url: '/question/' + id,
    method: 'delete'
  })

